package com.shuai.test;

public class max {

    public static void main(String[] args) {
        int[] a = {1,5,565,76,7,68,5,64,5};
        int max = getmax(a);
        System.out.println("最大数为："+max);
    }
    public static int getmax(int[] array){
        int max = array[0];
        for (int i = 1; i < array.length; i++) {
            if (max<array[i]){
                max = array[i];
            }
        }
        return max;
    }


}
